package com.springcloud.feignconsumer.controller;
import  com.springcloud.feignconsumer.feign.SayHiFeign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class FeignDemoController {


   private final  SayHiFeign sayHiFeign;
   @Autowired
    public FeignDemoController(SayHiFeign sayHiFeign) {
        this.sayHiFeign = sayHiFeign;
    }

    @GetMapping("sayhi")
    public  String sayhi(){
        return  sayHiFeign.sayHiFromClientOne();
    }
}
